home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / OBJ1_2.ZIP;1 / C_CURSOR.PRG < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.8 KB  |  62 lines

  1. //*****************************************************************************
  2. // C_Cursor.prg
  3. // Cursor class for OBJECT v2.03
  4. // Copyright (c) 1991, JHK, JHK-Software, Piestany
  5. // Please compile with: /N/M/W/A
  6. //-----------------------------------------------------------------------------
  7.  
  8. #include "Object.ch"
  9. #include "SetCurs.ch"
  10.  
  11.  
  12. create class Cursor from Loc
  13.   export:
  14.   var Size                  // SC_NONE
  15.   method New=CursorNew      //o:New()
  16.   method Init=CursorInit    //o:Init(Row,Col,Size)     //save parameters into instvar vars
  17.   method Get=CursorGet      //o:Get()                  //save cursor
  18.   method Set=CursorSet      //o:Set()                  //restore cursor
  19.   endclass
  20.  
  21.  
  22. //*****************************************************************************
  23. // Cursor:New() --> self
  24. // initialize new object
  25. //
  26. constructor CursorNew()
  27.   ::Size:= SC_NONE
  28.   return(self)
  29.  
  30.  
  31. //*****************************************************************************
  32. // Cursor:Init(Row,Col,Size) --> true
  33. // initialize cursor object.
  34. //
  35. method function CursorInit(Row,Col,Size)
  36.   ::super(Loc):Init(Row,Col)
  37.   store value Size into ::Size
  38.   return(true)
  39.  
  40.  
  41. //*****************************************************************************
  42. // Cursor:Get() --> true
  43. // get current cursor from hw and put it into instvars of Cursor.
  44. //
  45. method function CursorGet()
  46.   ::super(Loc):Get()   //save Row,Col
  47.   ::Size:=SetCursor()  //save cursor size
  48.   return(true)
  49.  
  50.  
  51. //*****************************************************************************
  52. // Cursor:Set() --> true
  53. // Set cursor from instvars into hw.
  54. //
  55. method function CursorSet()
  56.   ::super(Loc):Set()   //set position of cursor
  57.   SetCursor(::Size)    //restore cursor size
  58.   return(true)
  59.  
  60. //------------------------------------------------------- eof (c)JHK ----------
  61.  
  62.